package com.dhms.vostok1.data

import com.squareup.moshi.Json

data class TSDBDeviceFilter(
    val filter: String,
    val tagk: String,
    val type: String,
)

data class TSDBDeviceReqItem(
    val downsample: String,
    val filters: List<TSDBDeviceFilter>,
    val metric: String,
    @Json(name = "include_abnormal") val includeAbnormal: Boolean? = null
)

data class TSDBReqBody(
    val start: Long,
    val end: Long,
    val queries: List<TSDBDeviceReqItem>,
    val action: String? = null
)

data class TSDBResSourcesData(
    val file: String?,
    val value: Double?,
    val fl: String?,
    val th: String?,
)

data class TSDBData(
    val metric: String?,
    val sessions: Any?,
    val sources: Map<String, TSDBResSourcesData>?,
    @Json(name = "vibfile_exist") val vibFileExist: Boolean?,
    val dps: Map<String, Double>?,
)

typealias TSDBResData = List<TSDBData>